package taller2.controller.listeners.evaluateMeButtons;

import java.awt.event.ActionEvent;

import taller2.controller.listeners.UserImputListener;
import taller2.interfaces.AlgorithmApplicator;
import taller2.model.graph.algorithms.TransitiveLockApplicator;
import taller2.view.windows.UserImputWindow;

public class TransitiveLockEvaluateMeButtonListener extends EvaluateMeButtonListener{

	public TransitiveLockEvaluateMeButtonListener(AlgorithmApplicator aplicator) {
		super(aplicator);
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		menu.unselectButtons();
		TransitiveLockApplicator tl = (TransitiveLockApplicator)aplicator;

		String start = tl.getFirstTable();
		String sol = tl.getLastTable();

		if(!start.isEmpty() && !sol.isEmpty()){
			new UserImputWindow("Dada la siguiénte tabla","que resultado arroja el algoritmo?", start, sol, new UserImputListener());
		}
	}
}
